package com.team.RunsFast_Api.controller;

import com.team.RunsFast_Api.config.SystemConfig;
import com.team.RunsFast_Api.service.intf.UserLevelService;
import com.team.runsfast.vo.R;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @Description:
 * @Author: 邢朋辉
 * @Date: 2022/09/20 11:00:07
 */
@RestController
@RequestMapping("/api/userlevel/")
@CrossOrigin
@Api(tags = "用户等级相关操作")
public class UserLevelController {
    @Autowired
    private UserLevelService service;

    /**查询*/
    @GetMapping("all.do")
    public R all(){
        return service.queryAll();
    }

    /**查询*/
    @GetMapping("select.do")
    public R select(HttpServletRequest request){
        return service.select(request.getHeader(SystemConfig.HEADER_TOKEN));
    }
}